package cn.fisok.pdman.dbreverse;

import com.alibaba.fastjson.annotation.JSONField;

import java.util.Comparator;
import java.util.Map;
import java.util.TreeMap;

/**
 * 最终解析出来的数据模型
 */
public class ParseDataModel {
    @JSONField(ordinal = 10)
    private String dbType;
    @JSONField(ordinal = 20)
    private Module module;
    @JSONField(ordinal = 30)
    private Map<String, DataType> dataTypeMap = new TreeMap<String, DataType>(new Comparator<String>() {
        public int compare(String o1, String o2) {
            return o1.compareTo(o2);
        }
    });
    @JSONField(ordinal = 40)
    private Map<String,Object> properties = new TreeMap<String,Object>(new Comparator<String>() {
        public int compare(String o1, String o2) {
            return o1.compareTo(o2);
        }
    });

    public String getDbType() {
        return dbType;
    }

    public void setDbType(String dbType) {
        this.dbType = dbType;
    }

    public Module getModule() {
        return module;
    }

    public void setModule(Module module) {
        this.module = module;
    }

    public Map<String, DataType> getDataTypeMap() {
        return dataTypeMap;
    }

    public void setDataTypeMap(Map<String, DataType> dataTypeMap) {
        this.dataTypeMap = dataTypeMap;
    }

    public Map<String, Object> getProperties() {
        return properties;
    }

    public void setProperties(Map<String, Object> properties) {
        this.properties = properties;
    }
}
